#include <iostream>

#include "MyCoroutine.h"


MyCoroutine<int> func() {
    std::cout << "aaaaa" << std::endl;
    co_await std::suspend_never{};
    std::cout << "bbbbb" << std::endl;
    co_await std::suspend_always{};
    std::cout << "ccccc" << std::endl;
}

void test() {
    auto co = func();

    int count = 0;
    while (!co.Done())
    {
        std::cout << "count: " << ++count << std::endl;
        co.Resume();
    }
}

int main() 
{
    test();
    return 0;
}